import axios from '@/utils/request'

import config from '@/common/config'

let base = config.getMkBasePath();

/**
 * 客户每日订单金额统计表
 *1    默认只开放普通查询，所有查询，只要上传	 分页参数 {currentPage:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】}，后台都会自动按分页查询 其它 api用到再打开，没用到的api请注释掉，
 *2 查询、新增、修改的参数格式  params={id:'主键 主键',orderTotalFee:'订单总佣金=各个产品佣金合计',orderTotalAmount:'订单总金额',orderActPayAmount:'实际支付总金额',orderReduceAmount:'优惠扣减金额',custId:'客户编号',bizDate:'归属业务日期',actStaffFee:'营销人员实际发放佣金',startComputedDate:'开始核算时间',locationCount:'参与店铺总数',custName:'客户名称',computedStatus:'统计状态0正在统计1统计完成2统计失败3不再统计',locationId:'客户归属门店编号',locationName:'客户归属门店名称',shopId:'客户归属商户编号'}
 **/
 
//普通查询 条件之间and关系  
export const listUserOrder = params => { return axios.get(`${base}/mk/mng/computed/day/userOrder/list`, { params: params }); };

//模糊查询客户每日订单金额统计表 条件之间or关系  
//export const listUserOrderKey = params => { return axios.get(`${base}/mk/mng/computed/day/userOrder/listKey`, { params: params }); };

//删除一条客户每日订单金额统计表 params={id:'主键 主键'}
export const delUserOrder = params => { return axios.post(`${base}/mk/mng/computed/day/userOrder/del`,params); };

//批量删除客户每日订单金额统计表  params=[{id:'主键 主键'}]
export const batchDelUserOrder = params => { return axios.post(`${base}/mk/mng/computed/day/userOrder/batchDel`, params); };

//修改一条客户每日订单金额统计表记录
export const editUserOrder = params => { return axios.post(`${base}/mk/mng/computed/day/userOrder/edit`, params); };

//新增一条客户每日订单金额统计表
export const addUserOrder = params => { return axios.post(`${base}/mk/mng/computed/day/userOrder/add`, params); };